<?php

namespace LowCode\UI;

use LowCode\Support\JsExp;

/**
 * @method static static make(mixed $children = null);
 */
class Table extends Node
{
    public function __construct(mixed $children = null)
    {
        parent::__construct("WCrud");
        $this->children($children);
    }

    /**
     * @param string|JsExp $id
     * @return $this
     */
    public function id(string|JsExp $id): static
    {
        return $this->prop("id",$id);
    }

    /**
     * @param array|JsExp $columns
     * @return $this
     */
    public function columns(array|JsExp $columns): static
    {
        return $this->prop("columns",$columns);
    }
}
